const arr = [3, 5, 1, 4, 2];
const a = arr.reduce((t, v) => t + v);
// 等同于
const b = arr.reduce((t, v) => t + v, 0);

const c=arr.reduce((t,v)=>t * v)

console.log(a)  //15
console.log(b)  //15
console.log(c)  //120
